package com.gkjsj.exam1;

import java.util.List;

public class Teacher {
	
	private int tid;
	private String tname;
	private int tage;
	private String tphone;
	
	/**
	 * 1、使用构造注入
	 */
	
	public Teacher(int tid, String tname, int tage, String tphone) {
		
		super();
		this.tid = tid;
		this.tname = tname;
		this.tage = tage;
		this.tphone = tphone;
	}
	
	/**
	 * 2、属性注入
	 */
	
	public Teacher() {
		super();
	}
	
	public int getTid() {
		return tid;
	}
	public void setTid(int tid) {
		this.tid = tid;
	}
	public String getTname() {
		return tname;
	}
	public void setTname(String tname) {
		this.tname = tname;
	}
	public int getTage() {
		return tage;
	}
	public void setTage(int tage) {
		this.tage = tage;
	}
	public String getTphone() {
		return tphone;
	}
	public void setTphone(String tphone) {
		this.tphone = tphone;
	}

	@Override
	public String toString() {
		
		return "tid=" + tid + ",tname=" + tname + ",tage=" + tage + ",tphone=" + tphone;
	}
	
	
	
}
